<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ include file="/WEB-INF/jsp/commons/includes.jsp" %>

<c:forEach var="cur" items="${treeList}" varStatus="vs">
    <dl class="cate-item">
        <dt class="cf">
        <form action="${ctx}/admin/partstype/edit.shtml" method="post">
            <div class="btn-toolbar opt-btn cf">
                <a title="编辑" href="${ctx}/admin/partstype/edit/${cur.id}/${cur.fId}.shtml">编辑</a>
            </div>
            <div class="fold"><i></i></div>
            <div class="order">
                <input type="text" name="sort" class="text input-mini" value="${cur.sort}">
            </div>
            <div class="order">
                ${cur.typeCode}
            </div>
            <div class="enname">
                ${cur.typeNameEn}
            </div>
            <div class="name">
                <span class="tab-sign"></span>
                <input type="text" name="title" class="text" value="${cur.typeName}" disabled="disabled">
                <a class="add-sub-cate" title="添加子分类" href="${ctx}/admin/partstype/edit/0/${cur.id}.shtml">
                    <c:if test="${cur.level < 3}">
                        <i class="icon-add"></i>
                    </c:if>
                </a>
                <span class="help-inline msg"></span>
            </div>
        </form>
        </dt>

        <c:if test="${not empty cur.children}">
            <c:set var="treeList" value="${cur.children}" scope="request" /><!-- 注意此处，子列表覆盖treeList，在request作用域 -->
            <dd>
                <c:import url="/admin/partstype/tree.shtml"/>
            </dd>
        </c:if>
    </dl>
</c:forEach>